/*
 * @Author: '龙佳鑫' '1554845699@qq.com'
 * @Date: 2024-10-12 10:36:27
 * @LastEditors: '龙佳鑫' '1554845699@qq.com'
 * @LastEditTime: 2024-10-14 14:59:06
 * @FilePath: \trip_server\router\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 用户登录注册
const express = require('express');
const user = express.Router();
//导入验证数据中间件
const expressJoi = require("@escook/express-joi");
//导入需要验证的规则对象
const { userScheme } = require("../scheme/user.js");
const userRouter=require('../router_handler/user.js')
// 注册用户
user.post('/register',expressJoi(userScheme),userRouter.userRegister);
// 登录
user.post('/login',expressJoi(userScheme),userRouter.userLogin)
module.exports = user